# frozen_string_literal: true

require "bundler"

require "rake/testtask"
Rake::TestTask.new(:test) do |test|
  test.libs << "lib" << "test"
  test.test_files = FileList["test/**/*_test.rb"].sort
  test.verbose = true
end

Rake::TestTask.new(:part1) do |test|
  test.libs << "lib"
  test.test_files = FileList["test/**/*_test.rb"].sort
  test.verbose = true
end

Rake::TestTask.new(:part2) do |test|
  test.libs << "test"
  test.test_files = FileList["test/**/*_test.rb"].sort
  test.verbose = true
end

task :collate do
  require "simplecov"
  SimpleCov.collate Dir["coverage/resultset*.json"]
end

Rake::TestTask.new(:minitest) do |test|
  test.libs << "minitest"
  test.test_files = FileList["minitest/**/*_test.rb"].sort
  test.verbose = true
end
